<?php
   include "DB.php";
   $strQuery = "SELECT time,sellprice,domestic 
                FROM price where time >= DATE(NOW())
                " ;
   //where time >= DATE(NOW())
   $result = mysql_query($strQuery);
   $google_JSON = "{'cols': [{'id': '0', 'label': 'Time','type':'timeofday'},{'id': '1', 'label': 'Buy','type': 'number'},{'id': '2', 'label': 'Sell', 'type': 'number'}],'rows': ["; 
   
   while($r = mysql_fetch_array($result))
   {
       $f = date("H:i",strtotime($r[0]));
       //$time_obj = date("j,G,i,s",strtotime($r[0])); Date(".$year.",".$month.",".$time_obj.")
       $time_obj = date("G,i,s",strtotime($r[0]));
       $google_JSON_rows[] = "{'c':[{'v': [$time_obj,0], 'f':'".$f."'}, {'v': ".$r['1']."}, {'v': ".$r['2']."}]}";
   }
   $string = $google_JSON.implode(",",$google_JSON_rows)."]}";
   header('Content-type: application/json');
   $data_temp =  str_replace('"',' ',json_encode($string));
   $data = str_replace("'",'"',$data_temp);
   echo $data;
  
?>